/* 
 * File:   Parallellogram.h
 * Author: lgr013
 *
 * Created on 13 de septiembre de 2014, 12:12
 */

#ifndef PARALLELLOGRAM_H
#define	PARALLELLOGRAM_H

#include "Object.h"
#include "ObjFactory.h"
#include "Dot.h"
#include "WorldElement.h"
#include <Box2D/Box2D.h>

class Parallellogram : public WorldElement {
private:
    Object *object;
    struct ObjectInit data;
    bool equals;
    void updatePosition();
    void updateRotation();
    
public:
    Parallellogram();
    Parallellogram(ObjFactory *objFactory, bool flagStatic, float x, float y, float base, float height, double alpha, float mass, float rotation, int idImage);
    virtual ~Parallellogram();

    void updateData();
    void checkChanges();
    struct ObjectInit getData();    
    
    b2Vec2 getPosition();
    float getAngle();
    float getAngularVelocity();
    
    void setAngularVelocity(float velocity);
    void setUbicDyn(int id);
    bool getAreEquals();
    b2Body* getBody();
    void restartPlayer();    
};

#endif	/* PARALLELLOGRAM_H */

